package com.example.demo.controller

import com.example.demo.repo.CelebrityRepo
import com.example.demo.repo.IpRepo
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

@RestController
class IpConteroller {
    @Autowired
    private lateinit var ipRepo: IpRepo

    @GetMapping("/ip")
    fun getips(): List<String> {
        return ipRepo.findByNameContains("").map { it.name }
    }
}